<?php
$goods1=[
    ['name'=>'香蕉','price'=>'7.99','num'=>2],
    ['name'=>'苹果','price'=>'6.89','num'=>1],
    ['name'=>'橘子','price'=>'3.99','num'=>3]
];
echo $goods1[0]['price'];
foreach($goods1 as $value){
    foreach($value as $k=>$v){
        echo $k,"--".$v;
    }
    echo "<br>";
}
$goods2=
[
    ['香蕉','7.99','2'],
    ['苹果','6.89','1'],
    ['橘子','3.99','3']
];
echo $goods2[0][1]; 

$goods3=
[
    '香蕉'=>['7.99',2],
    '苹果'=>['6.89',1],
    '橘子'=>['3.99',3]
];
echo $goods3['香蕉'][0];
